<template>
</template>

<script>
	export default{
		methods:{
			pay(pay_info,sucFnc) {
				
				let extra_obj = {};
			
				console.log('pay_obj____extra_obj___________',extra_obj)
				const pay_fnc = {
					success:  (res) => {
						console.log('pay,..........success:' + JSON.stringify(res));
						this.$u.toast('支付成功')
						this.$emit('successroter')
						sucFnc()
					},
					fail:  (err) =>{
						console.log('fail:' + JSON.stringify(err));
						this.$u.toast('支付失败')
					},
				}
				let pay_obj = Object.assign({},pay_info,extra_obj,pay_fnc)
				//唤醒支付
				console.log('pay_obj_______________',pay_obj)
				uni.requestPayment(pay_obj);
			}
		}
	}
</script>

<style>
</style>
